package njci.softerware.com.myexpress2017.serviceObj;

import android.os.Parcel;
import android.os.Parcelable;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * Created by 徐连宝 on 2016/9/19.
 */
@DatabaseTable(tableName = "packageSign")
public class PackageSign implements Parcelable {

    /**
     * phone : 2355777
     * user_id : 16
     * sign_id : 16
     * NAME : admin
     * count_sign : 1
     * sign_date : 16-09-19
     */
    @DatabaseField(columnName = "keyId", generatedId = true)
    private Integer keyId;

    @DatabaseField(columnName = "phone")
    private String phone;
    @DatabaseField(columnName = "user_id")
    private int user_id;
    @DatabaseField(columnName = "sign_id")
    private int sign_id;
    @DatabaseField(columnName = "NAME")
    private String NAME;
    @DatabaseField(columnName = "count_sign")
    private int count_sign;
    @DatabaseField(columnName = "sign_date")
    private String sign_date;

    public Integer getKeyId() {
        return keyId;
    }

    public void setKeyId(Integer keyId) {
        this.keyId = keyId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public int getSign_id() {
        return sign_id;
    }

    public void setSign_id(int sign_id) {
        this.sign_id = sign_id;
    }

    public String getNAME() {
        return NAME;
    }

    public void setNAME(String NAME) {
        this.NAME = NAME;
    }

    public int getCount_sign() {
        return count_sign;
    }

    public void setCount_sign(int count_sign) {
        this.count_sign = count_sign;
    }

    public String getSign_date() {
        return sign_date;
    }

    public void setSign_date(String sign_date) {
        this.sign_date = sign_date;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.keyId);
        dest.writeString(this.phone);
        dest.writeInt(this.user_id);
        dest.writeInt(this.sign_id);
        dest.writeString(this.NAME);
        dest.writeInt(this.count_sign);
        dest.writeString(this.sign_date);
    }

    public PackageSign() {
    }

    protected PackageSign(Parcel in) {
        this.keyId=in.readInt();
        this.phone = in.readString();
        this.user_id = in.readInt();
        this.sign_id = in.readInt();
        this.NAME = in.readString();
        this.count_sign = in.readInt();
        this.sign_date = in.readString();
    }

    public static final Parcelable.Creator<PackageSign> CREATOR = new Parcelable.Creator<PackageSign>() {
        public PackageSign createFromParcel(Parcel source) {
            return new PackageSign(source);
        }

        public PackageSign[] newArray(int size) {
            return new PackageSign[size];
        }
    };
}
